package com.company.controller;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by tu on 2017/7/6.
 */
@Controller
public class ErrorController implements org.springframework.boot.autoconfigure.web.ErrorController {

  @RequestMapping("/error")
  public Object error() {
    return new ResponseEntity(HttpStatus.NOT_FOUND);
  }

  @Override
  public String getErrorPath() {
    return "error";
  }
}
